import type { AxiosRequestConfig, AxiosResponse } from 'axios'

export interface CLRequestHook<T = AxiosResponse> {
  requestHook?: (config: AxiosRequestConfig) => AxiosRequestConfig
  requestHookCatch?: (error: any) => any
  responseHook?: (res: T) => T
  responseHookCatch?: (error: any) => any
}

export interface CLRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  interceptors?: CLRequestHook<T>
  showLoading?: boolean
}
